import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import wk.entity.Admin;
import wk.service.impl.AdminServiceImpl;

import java.sql.SQLException;


//ssm测试类需要的注解
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext.xml"})

public class AdminTest {
    @Autowired
    private AdminServiceImpl adminService;



    @Test
    public void admincellphone() throws SQLException {
        Admin admin=new Admin();
        admin.setCellPhone("15925801839");
        admin.setAdminName("admin1");
        adminService.getCountByadminname("admin1");

        System.out.println(admin);
    }
}
